{% extends 'layout.html' %}

{% block main%}
<ol class="breadcrumb">
    <li><a href="/">管理首页</a></li>
    <li><span>添加内容</span></li>>
</ol>

<h3>添加内容</h3>
<form  method="post">

    <div class="form-group">
        <label for="title">分类：</label>
       <select name="category" id="category" class="form-control">
          {% for category in categories %}
           <option value="{{category.id}}">{{category.name}}</option>
           {% endfor %}
       </select>
    </div>

    <div class="form-group">
        <label for="title">标题：</label>
        <input type="text" class="form-control" id="title" placeholder="请输入内容标题" name="title">
    </div>

    <div class="form-group">
        <label for="description">内容简介：</label>
        <textarea name="description" id="description"  rows="5"  placeholder="请输入内容简介"  class="form-control"></textarea>
    </div>

    <div class="form-group">
        <label for="content">内容：</label>
        <textarea name="content" id="content"  rows="10"  placeholder="请输入内容"  class="form-control"></textarea>
    </div>

    <button type="submit" class="btn btn-primary">提交</button>
</form>

{%endblock%}